Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Public Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Public Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (ByVal lpLibFileName As String, ByVal hFile As Long, ByVal dwFlags As Long) As Long
Private Const DONT_RESOLVE_DLL_REFERENCES = &H1
Public Const LOAD_LIBRARY_AS_DATAFILE = 2
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function CopyStringA Lib "kernel32" Alias "lstrcpyA" (ByVal NewString As String, ByVal OldString As Long) As Long
Public Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
Public Declare Function lstrlenA Lib "kernel32" (ByVal lpString As Long) As Long
Public hModule As Long
Public picHeight As Long, picWidth As Long
Public Function InitResource(ByVal sLibName As String) As Boolean
On Error Resume Next
hModule = LoadLibraryEx(sLibName, 0, 1)
' hModule = LoadLibrary(sLibName)
InitResource = (hModule <> 0)
End Function
Public Sub ClearResource()
If Dir(TEMP_FILE_NAME) <> "" Then
Call mciSendString("close video", 0&, 0, 0)
Kill TEMP_FILE_NAME
End If
If hDialog Then Call DestroyWindow(hDialog)
If hModule Then FreeLibrary (hModule)
End Sub
Public Function ResTypeName(ByVal ResType As ResTypes) As String
Public Function ReplaceStr(ByVal str As String, ByVal sReplace As String, Optional ByVal sReplaceWith As String, Optional fCompare As VbCompareMethod) As String
Dim iLenOut As Integer, iLenIn As Integer
Dim i As Long
iLenOut = Len(sReplace)
iLenIn = Len(sReplaceWith)
If Len(str) > 0& Then
If iLenOut > 0& Then
Dim sOut As String
i = InStr(1&, str, sReplace, fCompare)
Do Until i = 0&
If iLenIn > 0& Then
str = Left$(str, i - 1&) & sReplaceWith & Mid$(str, i + iLenOut)